Skip to content

Conversation

@mmatera
Copy link
Contributor

@mmatera mmatera commented Jan 9, 2025

Investigating the causes of Mathics3/mathicsscript#87 (comment) I discover that
we were not consistent in the use of Definitions.get_ownvalue. This PR tries to amend this.

Co-authored-by: R. Bernstein <rocky@users.noreply.github.com>
# mypy complains about the plane conversion, but
# to_python() returns a string wrapped in quotes.
# So, let's get ride the quotes...
usagetext = rulemsg.get_replace_value().to_python(use_quotes=False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry - the option name is string_quotes not use_quotes.

@rocky
Copy link
Member

rocky commented Jan 9, 2025

LGTM

@mmatera mmatera merged commit a5179a9 into master Jan 10, 2025
14 checks passed
@mmatera mmatera deleted the more_on_definitions branch January 10, 2025 00:00
@rocky
Copy link
Member

rocky commented Jan 10, 2025

Forgot to mention this comment

# mypy complains about the plane conversion, but
# to_python() returns a string wrapped in quotes.
# So, let's get ride the quotes...

independent of the spelling mistake is wrong and should be removed. We have a type error, mypy catches it, and we have to adjust the code.

This can get addressed in a future PR though.

@mmatera
Copy link
Contributor Author

mmatera commented Jan 10, 2025

Forgot to mention this comment

# mypy complains about the plane conversion, but
# to_python() returns a string wrapped in quotes.
# So, let's get ride the quotes...

independent of the spelling mistake is wrong and should be removed. We have a type error, mypy catches it, and we have to adjust the code.

This can get addressed in a future PR though.

Yes, I am working on a few changes more on Definitions. I can remove it in the next PR.

@rocky
Copy link
Member

rocky commented Jan 10, 2025

Forgot to mention this comment

# mypy complains about the plane conversion, but
# to_python() returns a string wrapped in quotes.
# So, let's get ride the quotes...

independent of the spelling mistake is wrong and should be removed. We have a type error, mypy catches it, and we have to adjust the code.
This can get addressed in a future PR though.

Yes, I am working on a few changes more on Definitions. I can remove it in the next PR.

Could we get the brokenness fixed on mathicsscript and mathics-django fixed first, please?

@mmatera
Copy link
Contributor Author

mmatera commented Jan 10, 2025

Sure. Definitions.get_ownvalue now returns a BaseElement. Mathics3/mathicsscript#88 fixes mathicsscript. Mathics-Django seems to be automatically fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants